package com.huibur.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.huibur.entity.User;
import com.huibur.mapper.UserMapper;

import com.huibur.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yanzichu
 * @since 2021-11-19
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Autowired
    UserMapper userMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int insert(User user) {
     return userMapper.insert(user);

    }
}
